///************************************************************************
/// <copyrigth>2018-2019 Corporation.All Rights Reserved</copyrigth>
/// <author>tangyingzhong</author>
/// <contact>tangyz114987@outlook.com</contact>
/// <version>v1.0.0</version>
/// <describe>
/// Converting utf8 or gbk encoding to unicode encoding
///</describe>
/// <date>2021/1/31</date>
///***********************************************************************
#ifndef UNICODE_H
#define UNICODE_H

#include <string>
#include "EncodeType.h"

namespace SystemTool
{
	namespace Encoding
	{
		class Unicode
		{
		public:
			// Get utf8 wide string
			static std::wstring GetUtf8String(const std::string strData, EncodeType eEncodeType);

			// Get gbk wide string
			static std::wstring GetGbkString(const std::string strData, EncodeType eEncodeType);

		private:
			// Get utf8 wide string from utf8 string
			static std::wstring GetUtf8WString_UTF8(const std::string strData);

			// Get utf8 wide string from gbk string
			static std::wstring GetUtf8WString_GBK(const std::string strData);

			// Get utf8 wide string from gb2312 string
			static std::wstring GetUtf8WString_GB2312(const std::string strData);
		};
	}
}

#endif // UNICODE_H
